package com.android.bbczw.holder;

import com.android.bbczw.context.AuthContext;

public class AuthContextHolder {

	 private static final ThreadLocal<AuthContext> threadTokenContext = new ThreadLocal<AuthContext>();
	 
	 public AuthContextHolder() {
		 
	 }
	 
	 public static AuthContext get() {
		 if(null == threadTokenContext.get()) {
			 AuthContext authContext = new AuthContext();
			 threadTokenContext.set(authContext);
		 }
		 return threadTokenContext.get();
	 }
	 
	 public static void set(AuthContext authContext) {
		 threadTokenContext.set(authContext);
	 }
	 
	 public static void clear() {
		 threadTokenContext.set(null);
	 }
	
	
}
